package com.superm.mappers;

import com.superm.entity.Member;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface MemberMapper {

    /**
     * 根据条件查询指定信息
     * @return
     */
    List<Member> allMember(@Param("member")Member member, @Param("pageNo") Integer pageNo, @Param("pageSize")Integer pageSize);

    /**
     * 根据编号查询信息
     * @param memberId
     * @return
     */
    Member selectMemberId(@Param("memberId")Integer memberId);

    /**
     * 查询总条数
     * @param member
     * @return
     */
    int selectCount(@Param("member")Member member);

    /**
     * 修改信息
     * @param member
     * @return
     */
    int updateInfoMember(@Param("member")Member member);

    /**
     * 添加信息
     * @param member
     * @return
     */
    Integer addInfoMember(@Param("member")Member member);

    /**
     * 删除用户信息
     * @param memberId
     * @return
     */
    int deleteInfoMember(@Param("memberId")Integer memberId);


    /**
     * 单信息修改
     * @param memberId
     * @param memstate
     * @return
     */
    int updateOneInfoMation(@Param("memberId") Integer memberId,@Param("memstate")String memstate);
    /**
     * 根据手机号查询 会员信息
     */
   Member  selMember(@Param("member") Member member);

    /**
     * 根据会员id 减少指定金额
     * @param memberId
     * @return
     */
   Integer upMemberMoney(@Param("memberId") Integer memberId,@Param("Money")Double Money);
}
